fix(@angular/build): support TypeScript isolatedDeclarations option#32349
Closed
cexbrayat wants to merge 1 commit intoangular:mainfrom
Closed
fix(@angular/build): support TypeScript isolatedDeclarations option#32349cexbrayat wants to merge 1 commit intoangular:mainfrom
cexbrayat wants to merge 1 commit intoangular:mainfrom
Conversation
This change allows the use of TypeScript's isolatedDeclarations compiler option by conditionally preserving the declaration and composite options when isolatedDeclarations is enabled. Previously, the Angular CLI forcefully set both declaration and composite to false, which prevented the use of isolatedDeclarations as TypeScript requires at least one of these options to be true when isolatedDeclarations is set (TS5069 error): ``` ✘ [ERROR] TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. [plugin angular-compiler] ```
143e651 to
1d95ebf
Compare
Member
Author
|
@clydin @alan-agius4 In your opinion, can |
alan-agius4
reviewed
Jan 27, 2026
| ...compilerOptions, | ||
| noEmitOnError: false, | ||
| composite: false, | ||
| // TypeScript requires either declaration or composite to be true when isolatedDeclarations is set |
Collaborator
There was a problem hiding this comment.
This will most likely slow down the build since we'd be generating declarations we don't really need for an app. Also, our current setup does handles composite projects yet.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Recently, the Angular team said on a panel that
isolatedDeclarationscan make a huge difference in build times, but we currently can't test it in the CLI.Angular CLI forcefully set both declaration and composite to false, which prevents the use of isolatedDeclarations as TypeScript requires at least one of these options to be true when isolatedDeclarations is set (TS5069 error):
What is the new behavior?
This change allows the use of TypeScript's isolatedDeclarations compiler option by conditionally preserving the declaration and composite options when isolatedDeclarations is enabled.
Does this PR introduce a breaking change?
Other information